﻿using CommandLine;
using CommandLine.Text;

namespace LogManager.Console
{
    public class Options
    {
        [Option('c', "ConfigFile", Required = true, HelpText = "Configuration file path")]
        public string ConfigurationPath { get; set; }

        [Option('m', "RunMode", DefaultValue = RunMode.Archive, HelpText = "Defines running mode : Check,Archive")]
        public RunMode RunMode { get; set; }

        [HelpOption]
        public string GetUsage()
        {
            return HelpText.AutoBuild(this,
               (HelpText current) =>
               {
                   current.AddPreOptionsLine("Unable to read command arguments");
                   current.AddPostOptionsLine(@"Sample usage : -m Archive -c config.xml");
                   HelpText.DefaultParsingErrorsHandler(this, current);
               });
        }
    }
}
